<template>
	<view class="coupon">
		<view class="tabs">
			<view class="item" :class="{active:current==1 ? true : false}" @click="chooseClick(1)">
				<span>未使用</span>
			</view>
			<view class="item" :class="{active:current==2 ? true : false}" @click="chooseClick(2)">
				<span>已使用/过期</span>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current:1,
			}
		},
		methods: {
			chooseClick(type){
				this.current=type;
			},
		}
	}
</script>

<style lang="scss" scoped>
.coupon{
	height:100vh;
	background-color:#f5f5f5;
	.tabs{
		display:flex;
		align-items:center;
		background-color:#ffffff;
		justify-content:space-between;
		border-bottom:1px solid #f0f0f0;
		.active{
			border-bottom:1px solid #ff0000;
			color:#ff0000;
		}
		.item{
			width:33.3%;
			text-align:center;
			padding:20px;
		}
	}
}
</style>
